/*************************************************************************
> File Name: const.cpp
> Author: hzy
> Created Time: 2023-08-07 17:30:08
> Description: const增强
************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char const *argv[])
{
    const int a = 10;
    printf("&a = %p\n", &a);
    // 在C语言中 int *p = &a;
    int *p = (int *)&a;

    printf("a = %d, *p = %d\n", a, *p);
    printf("&a = %p,p = %p\n", &a, p);
    *p = 123;
    printf("a = %d, *p = %d\n", a, *p);
    

    return 0;
}